package com.demo.webflux.spring5core.test.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.demo.webflux.spring5core.framework.annotation.Service;

@Service
public class ModifyService implements IModifyService {

	private final Logger log = LoggerFactory.getLogger(getClass());

	/**增加
	 * @param name
	 * @param addr
	 * @return
	 */
	@Override
	public String add(String name, String addr) {
		log.info("modifyService add, name=" + name + ", addr=" + addr);
		try {
			Thread.sleep(100);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		return "modifyService add, name=" + name + ", addr=" + addr;
	}

	/**修改
	 * @param id
	 * @param name
	 * @return
	 */
	@Override
	public String edit(Integer id, String name) {
		return "modifyService edit, id=" + id + ", name=" + name;
	}

	/**删除
	 * @param id
	 * @return
	 */
	@Override
	public String remove(Integer id) {
		return "modifyService remove, id=" + id;
	}

}
